package com.china08.yxyapi.repository.mg.attendance;

import java.util.List;

import org.springframework.data.mongodb.repository.MongoRepository;

import com.china08.yxyapi.entity.mg.attendance.YxyTeaAttendanceStatistics;

public interface YxyTeaAttendanceStatisticsRepository extends MongoRepository<YxyTeaAttendanceStatistics, String> {

    List<YxyTeaAttendanceStatistics> findByIdAndDayOfDate(String id, Integer dayOfDate);

    List<YxyTeaAttendanceStatistics> findByTeacherIdAndSchoolId(String teacherId, String schoolId);

    List<YxyTeaAttendanceStatistics> findByTeacherIdAndDayOfDateContaining(String teacherId, String dayString);

    List<YxyTeaAttendanceStatistics> findByTeacherIdAndDayOfDateGreaterThanEqual(String teacherId, Integer dayOfDate);

    Integer countByTeacherIdAndSchoolIdAndDayOfDateBetween(String teacherId, String schoolId, int i, int j);

    List<YxyTeaAttendanceStatistics> findByTeacherIdAndSchoolIdAndDayOfDateBetween(String teacherId, String schoolId,
            int i, int j);

    // 异常打卡
    Integer countByTeacherIdAndSchoolIdAndSignStatus1NotInAndDayOfDateBetween(String teacherId, String schoolId,
            List<Integer> singnIntegers, int i, int j);

    Integer countByTeacherIdAndSchoolIdAndSignStatus2NotInAndDayOfDateBetween(String teacherId, String schoolId,
            List<Integer> singnIntegers, int i, int j);

    Integer countByTeacherIdAndSchoolIdAndSignStatus3NotInAndDayOfDateBetween(String teacherId, String schoolId,
            List<Integer> singnIntegers, int i, int j);

    Integer countByTeacherIdAndSchoolIdAndSignStatus4NotInAndDayOfDateBetween(String teacherId, String schoolId,
            List<Integer> singnIntegers, int i, int j);

    // 教师考勤记录
    List<YxyTeaAttendanceStatistics> findByTeacherIdAndSchoolIdAndDayOfDateBetweenOrderByDayOfDateDesc(String teacherId,
            String schoolId, int i, int j);

    // 本月打卡
    Integer countByTeacherIdAndSchoolIdAndSignStatus1InAndDayOfDateBetween(String teacherId, String schoolId,
            List<Integer> singnLst, int i, int j);

    Integer countByTeacherIdAndSchoolIdAndSignStatus2InAndDayOfDateBetween(String teacherId, String schoolId,
            List<Integer> singnLst, int i, int j);

    Integer countByTeacherIdAndSchoolIdAndSignStatus3InAndDayOfDateBetween(String teacherId, String schoolId,
            List<Integer> singnLst, int i, int j);

    Integer countByTeacherIdAndSchoolIdAndSignStatus4InAndDayOfDateBetween(String teacherId, String schoolId,
            List<Integer> singnLst, int i, int j);

}
